A data writing operation in a general tape drive in which a known linear data writing method (for example, an LTO drive (Non-Patent Document 1)) is described in FIG. 1. FIG. 1 is a block diagram of a general tape drive 100. The tape drive 100 includes a buffer 120, a recording channel 130, a head 14b, a tape 14a, a cartridge 14e, a motor 150, writing controller 160, a head position control system 170, and a motor driver 185. The writing controller 160 receives a write command to write data (a record) received from a host 105 to the buffer 120 and a synchronous command (a Sync command) to forcibly write a plurality of pieces of data stored in the buffer 120 to the tape 14a. When the communication standard of an interface 110 is SCSI, a command to write data from the host 105 is a write command, and a Sync command is a Write FileMarks Non Immediate (Write FMO) command.
The writing controller 160 controls the motor driver 185 via the head position control system 170. When a predetermined amount of data or more is stored in the data buffer 120, the drive 100 (the writing controller 160) sequentially writes the data to the tape 14a. To ensure all of unwritten data in the buffer 120 is recorded to tape 14a, the host 105 usually issues a synchronous command to the drive. A synchronous command indicates a transaction by a break in host processing. When the drive receives a synchronous command from the host 105, the drive is forced to write data that remains in the buffer 120 to the tape 14a. The drive 100 includes a data compression function 110. By the default setting, data transferred from the host is usually compressed (for example, the compression ratio is 50%) and stored in the buffer 120 to be recorded on the tape 14a.
FIG. 2 shows the relationship between the tape position and the tape velocity (writing velocity) in backhitch operations.
Upon the completion of each synchronous command, the following three backhitch operations are performed to write a plurality of following pieces of data (a single transaction):
The velocity S1 of a tape is decreased, and the tape is temporarily stopped (a deceleration-stop operation).
Then, the tape is reversed and accelerated. When a position corresponding to the end of a transaction data written just before has passed through the head 14b, the tape is decelerated and again stopped (a reverse-acceleration-deceleration operation by rewinding).
The tape is accelerated in the forward direction, and a position for writing the next transaction is reached at a tape running velocity S2 (a forward acceleration operation).
The backhitch operation reduces the room between pieces of data on a tape (the room between successive transactions) in writing the next transaction to the tape by these three operations, because the room causes the capacity loss on the tape.
FIG. 3 shows that drive cannot start to write data until backhitch operations associated with the operation of each Sync command are completed, because the tape is being accelerated or decelerated.
In a tape drive, backhitch operations that occur with each sync command take about two seconds. If a host issues sync commands to perform a lot of transactions, the backhitch operations cause a decrease in the performance of writing. Especially when Sync requests are successively issued, accelerated and decelerated time in backhitch is high percentage of the total time. Thus, it is preferable that the tape velocity (writing velocity) of a drive be optimized by the amount of records in a transaction.
In a magnetic tape subsystem that uses faster writing speed for a large amount of data, and uses slower writing speed for a small amount of data, as a result, the total time of transaction cycle will be short. If the next transaction size has been determined before drive starts a reverse-acceleration-deceleration operation in backhitching, the definitive velocity (the tape velocity and the writing velocity) for the next data can be determined.